package com.mapper;

import com.entity.SchoolCampus;
import com.entity.SchoolCampusDorm;
import org.apache.ibatis.annotations.Param;

import java.util.List;


// 评论 Mapper 接口
public interface DormMapper {
    /**插入宿舍*/
    Integer insertDorm(SchoolCampusDorm school);
    /**宿舍分页*/
    List<SchoolCampusDorm> queryDorm(@Param("page") Integer page, @Param("count") Integer count, @Param("dormName") String dormName);
    /**查询宿舍*/
    List<SchoolCampusDorm> lookDorm(SchoolCampusDorm dorm);
    /**删除宿舍*/
    Integer deleteDorm(Integer id);
    /**根据校区id删除宿舍*/
    Integer deleteDormByCampusId(Integer campusid);
    /**根据学校id删除宿舍*/
    Integer deleteDormBySchoolId(Integer schoolid);
    /**修改宿舍*/
    Integer changeDorm(SchoolCampusDorm dorm);
    /**统计宿舍总数*/
    Integer queryAllDormCount(@Param("dormName") String dormName);
    /**获取campusid对应校区的所有宿舍*/
    List<SchoolCampusDorm> getDormListByCampusId(@Param("campusId") Integer campusId);
}
